<div class='page_title'>Staff</div>
<?
foreach($data_staffs as $id=>$data_staff){
	echo "<div class='bloc-roster' id='".$data_staff['title']."'><div class='roster_liste_classe_title roster_liste_classe_".$id."'>".ucfirst($data_staff['title'])."</div>\n";
	$res=$sql->request("SELECT a.* FROM ".CFG_MYSQL_PREFIX."player AS a LEFT JOIN ibf_members AS b ON a.idUser = b.id WHERE b.mgroup IN (".$data_staff['mgroup'].") GROUP BY a.nom ORDER BY a.nom");
	foreach($res as $var){
		$player=new player($var);
		$datas=$player->get_datas();		
		$resto=$sql->request("SELECT g.`g_title`, g.`g_id` FROM `ibf_groups` AS g LEFT JOIN `ibf_members` AS m ON g.`g_id` = m.`mgroup` WHERE m.`id` = '".$var->idUser."' GROUP BY `g_id` LIMIT 1");
/* Commited code hide Officers grade */		
//		$offArray=explode(",", $offGroupId);
		$grdstr = utf8_encode($resto[0]->g_title);
//		if(in_array($resto[0]->g_id, $offArray))
//			$grdstr = '';
		$datas['GRADE_STR'] = str_replace("[Staff] ", "", $grdstr);
		$datas['GRADE_STR'] = str_replace("[", "", $datas['GRADE_STR']);
		$datas['GRADE_STR'] = str_replace("]", "", $datas['GRADE_STR']);
		write_ctn("roster_staff",$datas);
	}
/* TODO: Find unrostered staff members, and show them with a default avatar. */
	echo "</div>\n";
}
?>
